package com.umgsai.thread.thread75;

public class Task {
	public void doLongTimeTask() {
        for (int i = 0; i < 100; i++) {
            System.err.println("异步执行，线程名：" + Thread.currentThread().getName() + "---" + i);
        }
        synchronized(this){
            for (int i = 0; i < 100; i++) {
                System.out.println("同步执行，线程名：" + Thread.currentThread().getName() + "---" + i);
            }
        }
    }
}
